<?php

namespace app\index\controller;

use app\index\model\Banner as BannerModel;
use app\index\model\Config as ConfigModel;
use app\index\model\Healthy;
use think\Controller;
use think\Request;

class Institute extends BaseController
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $banner = BannerModel::getBanner('qingshitu');
        $action = $request->action();
        $this->assign('banner', $banner);
        $this->assign('action', $action);
    }

   /**
    * 健康知识
    */
   public function healthy()
   {
       $healthies = Healthy::getLists();
       $this->assign('healthies', $healthies);
       return $this->fetch("institute-healthy");
   }

    /**
     * 健康知识
     */
    public function healthyDetail($id = 0)
    {
        $healthy = Healthy::getById($id);
        $this->assign('healthy', $healthy);
        return $this->fetch("institute-healthy-detail");
    }

    /**
     * 郑多燕亲研故事
     */
    public function story()
    {
        $story = ConfigModel::getBaseValue('institutestory');
        $this->assign('story', $story);
        return $this->fetch("institute-story");
    }
}
